/***************************************************************************
 * File name: EPubPagingImp.h
 * Original author: caizhifei2003@163.com
 * Date: 2013.03.01
 ***************************************************************************/
#ifndef _EPUB_PAGING_IMP_H_
#define _EPUB_PAGING_IMP_H_

#include "IEPubPaging.h"
#include "EPubPageImp.h"
#include <vector>

class EPubPagingImp : public IEPubPaging
{
	typedef std::vector<EPubPointer<EPubPageImp>>			EPubPageList;
public:
	virtual EPUB_UInt32 GetPageCount() const { return m_PageList.size(); }

	virtual EPubPointer<IEPubPage> GetFirstPage() const;
	virtual EPubPointer<IEPubPage> GetLastPage() const;

	virtual EPubPointer<IEPubPage> AddPage(EPubPointer<IEPubMedia> mediaFile);
	virtual EPubPointer<IEPubPage> InsertPage(EPubPointer<IEPubMedia> mediaFile, EPUB_UInt32 index = 0);

	virtual EPUB_Result RemovePage(EPUB_UInt32 index);
	virtual void RemoveAllPage() { m_PageList.clear(); }

private:
	EPubPageList				m_PageList;
};

#endif // _EPUB_PAGING_IMP_H_